﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace WebshopPizzaRio
{
    public partial class Pizza_samenstellen_intro : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void bt_pizzasamenstellen_stap_Click(object sender, EventArgs e)
        {
            MembershipUser currentuserid = Membership.GetUser();
            try
            {
                if ((Guid)currentuserid.ProviderUserKey == null)
                {
                    throw new NullReferenceException();
                }
                else
                {
                    Samenstellen samenstellen = (Samenstellen)Session["samenstellen"];

                    samenstellen.GetandSetPizzaNaam = pizzasamengesteldnaam.Text;
                    if (RadioButtonList1.SelectedValue == "0")
                    {
                        samenstellen.GetandSetPubliekelijk = "0";
                    }
                    else
                    {
                        samenstellen.GetandSetPubliekelijk = "1";
                    }

                    samenstellen.GetandSetIseersteStapGedaan = true;

                    Response.Redirect("Pizza-samenstellen.aspx");
                }
            }
            catch (NullReferenceException)
            {
                Label1.Visible = true;
            }
        }
    }
}